/*
@file	Polygon.h
@author	Saume
*/

#pragma once

#include "Vector.h"

class Polygon;
class Circle;
class CustomRectangle;
bool operator==(const Polygon&, const Polygon&);

class Polygon
{
protected: 
	float x, y;
public:
	Polygon();
	Polygon(float, float);
	Polygon(const Vector* const);
	virtual ~Polygon();
	float GetX() const { return x; }
	float GetY() const { return y; }
	void SetPosition(float xVal, float yVal) { x = xVal; y = yVal; return; }
	void SetPosition(const Vector* const v) { SetPosition(v->x, v->y); return; }
	void MoveBy(float, float);
	void MoveBy(const Vector* const);

	// pure virtual functions
	virtual bool Contains(float, float) const = 0;
	virtual bool Contains(const Vector* const) const = 0;
	virtual bool CollidesWith(const CustomRectangle* const) const = 0;
	virtual bool CollidesWith(const Circle* const) const = 0;

	virtual void Display() const;
};

